<template>
	<view>
		<!--开关组件-->
		<switch-button v-model="status" @toFather="toFather"></switch-button>
		<!--外部控制-->
		<input type="button" value="外部变更状态" @click="change">

		<text>{{ status }}</text>
	</view>
</template>

<script>
	import switchButton from 'components/switch-button.vue'
	export default {
		 data() {
		  return {
			status: true ,//开关状态数据
      }
		},
		methods: {
			change() {
				this.status = !this.status;
			},
			toFather(status) {
				console.log(status)
			}
		},
		components: {
			switchButton,
		},
	}
</script>
<style>
	view {
		display: block;
	}
</style>
